//
//  TestEssayAnserCell.m
//  ProjectDemo
//
//  Created by IOS3 on 2019/1/4.
//  Copyright © 2019 IOS3. All rights reserved.
//

#import "TestEssayAnserCell.h"



@interface TestEssayAnserCell ()

@property (nonatomic, strong) UILabel *lable;

@end


@implementation TestEssayAnserCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI {
    self.backgroundColor = UIColor.grayColor;
    self.lable = UILabel.new;
    self.lable.font = [UIFont systemFontOfSize:16];
    self.lable.textColor = UIColor.darkTextColor;
    [self.contentView addSubview:self.lable];
    [self.lable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(self.contentView);
    }];
}

- (void)setText:(NSString *)text {
    _text = text;
    self.lable.text = text;
}

- (void)setSelected:(BOOL)selected {
    [super setSelected:selected];
    if (selected) {
        self.backgroundColor = UIColor.redColor;
    }
    else {
        self.backgroundColor = UIColor.grayColor;
    }
    
}

@end
